home *** CD-ROM | disk | FTP | other *** search
- program AutoRequester;
-
- uses Exec,Intuition,Graphics;
-
- const
- bodytext : string = 'Where do you want to be tomorrow?'#0;
- postext : string = 'Here'#0;
- negtext : string = 'No, There!'#0;
-
- var
- body,positive,negative : tIntuiText;
- b : boolean;
-
- begin
- IntuitionBase:=pIntuitionBase(OpenLibrary('intuition.library',36));
- if IntuitionBase<>NIL then
- begin
- body.FrontPen:=1;
- body.BackPen:=0;
- body.DrawMode:=JAM2;
- body.LeftEdge:=2;
- body.TopEdge:=2;
-
- positive:=body;
- negative:=body;
-
- body.Itext:=@bodytext[1];
- positive.IText:=@postext[1];
- negative.IText:=@negtext[1];
-
- b:=AutoRequest(intuitionbase^.ActiveWindow,@body,@positive,@negative,0,0,300,100);
- CloseLibrary(pLibrary(IntuitionBase));
-
- Write('You clicked on: ');
- if b then Writeln('"Here"') else Writeln('"No, there!"');
- end;
- end.
-